const mongoose = require('mongoose');
const { baseModel } = require('./baseModel')
const TeaSchema = new mongoose.Schema({
    teaNumber:{
        type:String,
        required:true,
        //唯一值
        unique:true
    },
    teaName:{
        type:String,
        required:true
    },
    teaSex:{
        type:String,
        required:true
    },
    //密码
    teaPassword:{
        type:String,
        required:true
        
    },
    //是否在职
    teaIsWork:{
        type:Number,
        default:0 // 0表示在职，1表示离职
    },
    //职位id
    jobId:{
        type:mongoose.SchemaTypes.ObjectId,
        ref:'Job',
        required:true
    },
    ...baseModel
})

module.exports = TeaSchema